//导入vue组件
import Vue from 'vue';
import App from './App.vue';

//格式化日期
import moment from 'moment';
Vue.filter("dateFormat",function(value,format="YYYY-MM-DD HH:mm:ss"){
	return moment(value).format(format);
});
//d导入路由
import VueRouter from 'vue-router';
//安装路由
Vue.use(VueRouter);

//导入vue resource
import VueResource from 'vue-resource';
Vue.use(VueResource);
//导入mui样式
import './lib/mui/css/mui.min.css';
// 导入扩展图标样式
import './lib/mui/css/icons-extra.css';

import 'mint-ui/lib/style.css';
// 按需导入 Mint-UI 中的组件   
import {Header,Swipe,SwipeItem,Button,Switch} from 'mint-ui';
Vue.component(Header.name, Header);
//轮播组件
Vue.component(Swipe.name, Swipe);
Vue.component(SwipeItem.name, SwipeItem);
Vue.component(Button.name, Button);
Vue.component(Switch.name, Switch);
//图片预览插件https://github.com/LS1231/vue-preview
import VuePreview from 'vue-preview'
Vue.use(VuePreview, {
  mainClass: 'pswp--minimal--dark',
  barsSize: {top: 0, bottom: 0},
  captionEl: false,
  fullscreenEl: false,
  shareEl: false,
  bgOpacity: 0.85,
  tapToClose: true,
  tapToToggleControls: false
})
import router from './router.js';
import store from './store/DataStore.js';
//创建vue 实例
var vue = new Vue({
	el:'#app',
	render(fc) {
		return fc(App);
	},
	router,
	store
});